<template>
  <el-card class="custom-card">
    <!-- 卡片顶部区域 -->
    <div class="flex flex-col">

      <!-- 大标题 -->
      <h1 class="contact-title">
        登记表下载
      </h1>

      <div class="custom-double-divider">
        <el-divider class="title-divider" />
      </div>

      <!-- 下载内容区域 -->
      <div class="download-section">
        <div class="download-content">
          <!-- 左右布局容器 -->
          <div class="download-container">
            <!-- 左边下载链接 -->
            <div class="download-left">
              <a
                  href="/菌株鉴定与保藏登记表.doc"
                  class="download-link"
                  download="菌株鉴定与保藏登记表.doc"
              >
                · 菌株鉴定与保藏登记表
              </a>
            </div>

            <!-- 右边日期 -->
            <div class="download-right">
              <span class="download-date">2025-10-20</span>
            </div>
          </div>
        </div>
      </div>

    </div>
  </el-card>
</template>

<script setup>
import { ref } from 'vue'

// 处理下载点击事件（可选）
const handleDownload = () => {
  console.log('开始下载菌株鉴定与保藏登记表');
  // 这里可以添加下载统计或其他逻辑
}
</script>

<style scoped>
/* 自定义卡片样式 */
.custom-card {
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  padding: 2rem;
  transition: all 0.3s ease;
  max-width: 900px;
  min-height: 600px;
  margin: 0 auto;
}

.custom-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

/* 标题样式 */
.contact-title {
  font-size: 35px;
  font-weight: bold;
  color: #333;
  text-align: start;
  margin-bottom: 2rem;
}

/* 下载区域样式 */
.download-section {
  margin-top: 1rem;
  margin-bottom: 2rem;
}

.download-content {
  line-height: 1.8;
  color: #555;
}

/* 下载容器布局 */
.download-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  background-color: #f8f9fa;
  border-radius: 8px;
  border-left: 4px solid #13675b;
  transition: all 0.3s ease;
}

.download-container:hover {
  background-color: #f0f2f5;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* 左边下载链接样式 */
.download-left {
  flex: 1;
  text-align: left; /* 确保左对齐 */
}

.download-link {
  font-size: 1.1rem; /* 缩小字体大小 */
  font-weight: 500;
  color: #13675b;
  text-decoration: none;
  transition: all 0.3s ease;
  display: inline-block;
  padding: 0.5rem 0;
  text-align: left; /* 确保链接文本左对齐 */
  width: 100%; /* 确保占满整个容器宽度 */
}

.download-link:hover {
  color: #0e5449;
  text-decoration: underline;
  transform: translateX(5px);
}

/* 右边日期样式 */
.download-right {
  margin-left: 2rem;
}

.download-date {
  font-size: 0.9rem; /* 相应缩小日期字体 */
  color: #666;
  padding: 0.5rem 1rem;
  border-radius: 4px;
}

/* 分隔线样式 */
.custom-double-divider {
  display: flex;
  width: 100%;
  margin-bottom: 20px;
}

.title-divider {
  position: relative;
  border: none;
  margin: 0;
  height: 1px;
}

/* 左侧 20% 的分隔线（绿色） */
.title-divider::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 20%;
  height: 4px;
  background: #13675b;
}

/* 右侧 80% 的分隔线（灰色） */
.title-divider::after {
  content: "";
  position: absolute;
  right: 0;
  top: 0;
  width: 80%;
  height: 1px;
  background: #e5e7eb;
}

/* 响应式调整 */
@media (max-width: 768px) {
  .custom-card {
    padding: 1.5rem;
  }

  .contact-title {
    font-size: 1.8rem;
  }

  .download-container {
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem;
  }

  .download-link {
    font-size: 1rem; /* 移动端相应调整 */
  }

  .download-right {
    margin-left: 0;
    margin-top: 1rem;
  }

  .download-date {
    font-size: 0.85rem; /* 移动端相应调整 */
    padding: 0.4rem 0.8rem;
  }
}

@media (max-width: 480px) {
  .contact-title {
    font-size: 1.5rem;
  }

  .download-link {
    font-size: 0.95rem;
  }

  .download-date {
    font-size: 0.8rem;
  }
}
</style>